<?php
require_once($application_folder."/controllers/navigator.php");
class Core extends navigator 
{

    function __construct()
    {
        parent::__construct(); 
        $this->lang->load('jadroagent', $this->lang_ses->getlang());
    }

    function index($page='home',$sub='', $upsub= '')
    { 

        // LANGUAGE CHANGE
        if(substr($page,0,3)=='lng'){
            
            $this->lang_ses->setLang(substr($page,3,2));
            
            $p = substr($page,5,strlen($page)-2);
            $s = $sub;
            $u = $upsub;
            
            if($u!=''){
                redirect( base_url().$p.'/'.$s.'/'.$u );
            }
            else if($s!=''){
                redirect( base_url().$p.'/'.$s );
            }
            else {
                redirect( base_url().$p );
            }
        }
        // END LANGUAGE CHANGE 

        $this->core_index($page, $sub, $upsub);
    }  



}